<template>
  <div class="app-content">
  <!-- 顶部Header区域-->
  <mt-header fixed title="漫画城" class="head">
    <router-link  to="" slot="left">
        <mt-button icon="back" @click="$router.back(-1)" v-show="isShow" >返回</mt-button>
      </router-link>
  </mt-header>

  <!--中间的路由router-view区域 -->
  <transition >
     <router-view></router-view>
  </transition>


  <!-- 底部Tabbar区域-->
  <nav class="mui-bar mui-bar-tab">
  			<router-link class="mui-tab-item mui-active" to="/HomeContainer">
  				<span class="mui-icon mui-icon-home"></span>
  				<span class="mui-tab-label">首页</span>
  			</router-link>

  			<router-link class="mui-tab-item" to="/MenberContainer">
  				<span class="mui-icon mui-icon-contact mui-icon-icon-contact-filled"></span>
  				<span class="mui-tab-label">会员</span>
  			</router-link>
  			<router-link class="mui-tab-item" to="/ShopContainer">
  				<span class="mui-icon mui-icon-extra mui-icon-extra-cart">
            <span class="mui-badge" id="badge">{{$store.getters.getAllCount}}</span>
          </span>
  				<span class="mui-tab-label">购物车</span>
  			</router-link>
  			<router-link class="mui-tab-item" to="/SearchContainer">
  				<span class="mui-icon mui-icon-search"></span>
  				<span class="mui-tab-label">搜索</span>
  			</router-link>
  		</nav>

  </div>
</template>

<script>

export default{
  data(){
    return {
      isShow:false
    }
  },
  methods:{
    goF(){
      this.$router.go(-1)
    }
  },
watch:{
  $route(now,old){
    if(now.path=="/HomeContainer"){
                this.isShow=false;
         } else{
             this.isShow=true;
         }
  }
},
}
</script>

<style scoped>
  .mint-header{
    z-index: 99;
  }
  .app-content{
    padding-top: 40px;
    padding-bottom: 50px;
    overflow-x: hidden;
  }
  .v-enter
  {
    opacity: 0;
    transform: translateX(100%);

  }
  .v-leave-to{
    opacity: 0;
    transform: translateX(-100%);
    position: absolute;
  }
  .v-enter-active,
  .v-leave-active{
    transition: all 0.5s ease;
  }
  .btn{
    z-index: 99;
    width: 10px;
    height: 10px;
    background-color: #0000FF;
  }

</style>
